package cu.tedu._05mvcboot02.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UserDTO {
    @Pattern(regexp = "^(?![^\\s])(?![^\\n])(?![^\\r])(?![^\\f])(?![^\\a])[A-Za-z0-9]{6,12}$",message = "用户名6-12位，并且不能是空白串")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;
    @NotNull(message = "密码不能为NULL")
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;


}
